﻿<UserControl
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity" xmlns:pb="clr-namespace:Spritehand.PhysicsBehaviors;assembly=Spritehand.PhysicsBehaviors" xmlns:local="clr-namespace:ShuffleBoard" x:Class="ShuffleBoard.ucMainGame"
    mc:Ignorable="d"
    Width="480" Height="800">
	<UserControl.Resources>
		<Storyboard x:Name="sbRotateTable">
			<DoubleAnimation Duration="0:0:1" To="-40" Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.RotationX)" Storyboard.TargetName="cnvTable" d:IsOptimized="True"/>
		</Storyboard>
	</UserControl.Resources>
    
    <Canvas x:Name="LayoutRoot">
    	<Canvas.Background>
    		<RadialGradientBrush Center="0.805,0.237" GradientOrigin="0.805,0.237">
    			<GradientStop Color="#FF353535" Offset="0"/>
    			<GradientStop Color="Black" Offset="1"/>
    		</RadialGradientBrush>
    	</Canvas.Background>

        <Canvas x:Name="cnvTable" Width="480" Height="800" d:LayoutOverrides="Width, Height" CacheMode="BitmapCache">
			<Canvas.Projection>
				<PlaneProjection/>
			</Canvas.Projection>
			<i:Interaction.Behaviors>
				<pb:PhysicsControllerBehavior GravityVertical="0" MousePickEnabled="False" Iterations="64" TimeStep="0.02" DebugMode="False" />
			</i:Interaction.Behaviors>
    
			<Canvas x:Name="cnvTableInner" Height="1077" Canvas.Left="60" Canvas.Top="-277" Width="360">
				<Image Height="1077" Source="/images/shuffleboardTable.jpg" Stretch="Fill" Width="360" />
				<local:ucPlayerUp x:Name="ucPlayerUp1" Height="150" Canvas.Top="630" Width="360"/>

			</Canvas>
			<Rectangle x:Name="rectSensorLeft" Height="1191" Canvas.Top="-334" Width="60" Fill="#FF50352C" Opacity="0.2" Canvas.Left="-42">
				<i:Interaction.Behaviors>
					<pb:PhysicsObjectBehavior IsStatic="True"/>
				</i:Interaction.Behaviors>
			</Rectangle>
			<Rectangle x:Name="rectSensorRight" Height="1191" Canvas.Left="463" Canvas.Top="-334" Width="60" Fill="#FF50352C" Opacity="0.2">
				<i:Interaction.Behaviors>
					<pb:PhysicsObjectBehavior IsStatic="True" MomentOfIntertia="0"/>
				</i:Interaction.Behaviors>
			</Rectangle>
			<Rectangle x:Name="rectSensorTop" Height="49" Canvas.Left="-76" Canvas.Top="-366" Width="631" Fill="#FF50352C" Opacity="0.2">
				<i:Interaction.Behaviors>
					<pb:PhysicsObjectBehavior IsStatic="True"/>
				</i:Interaction.Behaviors>
			</Rectangle>
			<Rectangle x:Name="rectSensorBottom" Height="49" Canvas.Left="38" Canvas.Top="834" Width="381" Fill="#FF50352C" Opacity="0.2">
				<i:Interaction.Behaviors>
					<pb:PhysicsObjectBehavior IsStatic="True"/>
				</i:Interaction.Behaviors>
			</Rectangle>
			<Rectangle x:Name="rectInBounds" Height="292" Canvas.Left="60" Canvas.Top="508" Width="360" Stroke="#FF9D1A1A"/>
			<Rectangle x:Name="rectPoints3" Height="100" Canvas.Left="60" Stroke="#FF7C2828" Canvas.Top="-279" Width="360" StrokeThickness="4"/>
			<Rectangle x:Name="rectPoints2" Height="100" Canvas.Left="60" Stroke="#FF7C2828" Canvas.Top="-182" Width="360" StrokeThickness="4"/>
			<Rectangle x:Name="rectPoints1" Height="100" Canvas.Left="60" Stroke="#FF7C2828" Canvas.Top="-84" Width="360" StrokeThickness="4"/>
			<TextBlock Height="39" Canvas.Left="123" TextWrapping="Wrap" Text="2" Canvas.Top="-154" Width="214" FontSize="26.667" FontWeight="Bold" Foreground="#FF7C2828" TextAlignment="Center"/>
			<TextBlock Height="39" Canvas.Left="123" TextWrapping="Wrap" Text="3" Canvas.Top="-248" Width="214" FontSize="26.667" FontWeight="Bold" Foreground="#FF7C2828" TextAlignment="Center"/>
			<TextBlock Height="39" Canvas.Left="123" TextWrapping="Wrap" Text="1" Canvas.Top="-58" Width="214" FontSize="26.667" FontWeight="Bold" Foreground="#FF7C2828" TextAlignment="Center"/>
			<local:ucPuck x:Name="bluePuck1" Canvas.Left="200" Canvas.Top="700" d:LayoutOverrides="Width, Height"/>
			<local:ucPuck x:Name="bluePuck2" Canvas.Left="200" Canvas.Top="700" d:LayoutOverrides="Width, Height"/>
			<local:ucPuck x:Name="bluePuck3" Canvas.Left="200" Canvas.Top="700" d:LayoutOverrides="Width, Height"/>
			<local:ucPuck x:Name="redPuck1" Canvas.Left="200" Canvas.Top="700" d:LayoutOverrides="Width, Height" ColorHighlight="#FFCDBCBC" ColorMain="#FFAB3A28"/>
			<local:ucPuck x:Name="redPuck2" Canvas.Left="200" Canvas.Top="700" d:LayoutOverrides="Width, Height" ColorHighlight="#FFCDBCBC" ColorMain="#FFAB3A28"/>
			<local:ucPuck x:Name="redPuck3" Canvas.Left="200" Canvas.Top="700" d:LayoutOverrides="Width, Height" ColorHighlight="#FFCDBCBC" ColorMain="#FFAB3A28"/>
		</Canvas>
		<local:ucScoreBoard x:Name="ucScoreBoard1" d:LayoutOverrides="Width, Height"/>
		<Image x:Name="imgSplash" Height="800" Source="/splashscreenimage.jpg" Stretch="Fill" Width="480" Visibility="Collapsed"/>
	</Canvas>
</UserControl>
